package com.zzw.basic.classloader;

import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.List;

public class TestJdk8 {

	public void replace(String str,List<String> list){
		
	}
	
	public static void main(String[] args) {
		Class<TestJdk8> clazz = TestJdk8.class;
		try {
			Method replace = clazz.getMethod("replace", String.class,List.class);
			System.out.println("replace:" + replace.getParameterCount());
			Parameter[] parameters = replace.getParameters();
			int index = 1;
			for(Parameter parameter:parameters){
				if(parameter.isNamePresent()){
					System.out.println(index);
					System.out.println(parameter.getName());
					System.out.println(parameter.getParameterizedType());
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
